#ifndef MODELCONTAINER_H
#define MODELCONTAINER_H

#include <QObject>
#include "modelcontainerbase.h"

#include "apnavtreemodel.h"
#include "aptablemodel.h"
#include "tenantsmodel.h"
#include "leasesmodel.h"
#include "familymodel.h"
#include "paymentsmodel.h"
#include "billsmodel.h"


class ModelContainer: public QObject, public ModelContainerBase
{

    Q_OBJECT

    ApNavTreeModel  *mp_town_model;
    ApTableModel      *mp_apartments_model;
    TenantsModel      *mp_tenants_model;
    FamilyModel       *mp_family_model;
    LeasesModel      *mp_leases_model;
    PaymentsModel *mp_payments_model;
    BillsModel          *mp_bills;

public:
    explicit ModelContainer(QObject *parent = 0);

    void set_dbms(HousingDBMS *p_dbms);
    void load_data();

    inline ApNavTreeModel  *get_town_model() {return mp_town_model;}
    inline ApTableModel      *get_apartments_model() {return mp_apartments_model;}
    inline TenantsModel      *get_tenant_model() {return mp_tenants_model;}
    inline FamilyModel        *get_family_model() {return mp_family_model;}
    inline LeasesModel       *get_leases_model() {return mp_leases_model;}
    inline PaymentsModel   *get_payments_model() {return mp_payments_model;}
    inline BillsModel            *get_bills_model() {return mp_bills;}

};

#endif // MODELCONTAINER_H
